home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / telecomm / fnordadl / fn132src.zoo / cith / door.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-02  |  2.9 KB  |  84 lines

  1. /*
  2.  * door.h -- headers used for shell escapes
  3.  *
  4.  * shell escape information is kept in the file CTDLDOOR.SYS, which is composed
  5.  * of lines of the following form:
  6.  *
  7.  * <cmd name> <access> <program name> [command tail] [#comment]
  8.  *
  9.  * like so:
  10.  *
  11.  * shell   s    a:\auto\tsh.prg  -N
  12.  * arcp    ur   a:\bin\arc.tos p
  13.  * popular a    a:\bin\tsh.prg a:\bin\popular.tos -m >! a:\library\popular
  14.  * rogue   un   a:\bin\rogue.prg -tty
  15.  *
  16.  * permission modes for shell commands are as follows:
  17.  *
  18.  *  [z|s|a|u][t][n][d][r][w][c][m][x][v][p][h][i<room>][l<dir>]
  19.  *  z == only TheSysop access
  20.  *  s == only sysop access
  21.  *  a == aide & sysop access
  22.  *  u == universal access
  23.  *  t == allow command tails
  24.  *  n == pass username to the command as a command tail
  25.  *  d == run in directory rooms only
  26.  *  r == only executable in readable directories
  27.  *  w == only executable in writable directories
  28.  *  c == run on the console only
  29.  *  m == run on the modem only
  30.  *  x == flag for 'special' doors, not executable from normal command line
  31.  *  v == 'archiver' door, for use in .RH
  32.  *  p == file transfer protocol door (future extension)
  33.  *  h == execute the command in the BBS' home directory (no link in dir rooms)
  34.  *  i<room> == link the command to this room
  35.  *  l<dir> == link the command to this directory
  36.  *
  37.  *  The command-line form for a shell escape is:
  38.  *  !<name> <tail>
  39.  *
  40.  *  if you are not a sysop, you cannot use the characters '\' or ':' in
  41.  *  a command tail.
  42.  *
  43.  */
  44.  
  45. #ifndef _DOOR_H
  46. #define _DOOR_H
  47.  
  48. #define DOORCHARS    "zsautndrwcmxvphil"
  49.  
  50. struct doorway {
  51. #define DOORSIZE    10
  52.     char dr_name[DOORSIZE];
  53.     long dr_mode;
  54. #define    DR_USER        0x0000        /* ... + users            */
  55. #define    DR_AIDE        0x0001        /* ... + aides            */
  56. #define DR_SYSOP    0x0002        /* ... + SomeSysop()s        */
  57. #define DR_THESYSOP    0x0004        /* TheSysop() only        */
  58. #define DR_UMASK        0x0007
  59. #define    DR_NAMED    0x0008        /* pass in username        */
  60. #define    DR_DIR        0x0010        /* directory rooms...        */
  61. #define    DR_WRITE    0x0020        /* only in writable dirs...    */
  62. #define    DR_READ        0x0040        /* only in readable dirs...    */
  63. #define DR_CONSOLE    0x0080        /* run on the console only?    */
  64. #define    DR_MODEM    0x0100        /* or the modem only?        */
  65. #define    DR_IOMASK        0x0180
  66. #define    DR_LINKED    0x0200        /* link the program to a dir    */
  67. #define    DR_TAIL        0x0400        /* command tails are allowed    */
  68. #define DR_SPECIAL    0x0800        /* door for the system ONLY?     */
  69. #define DR_PROTOCOL    0x1000        /* file transfer protocol?    */
  70. #define DR_ARCHIVER    0x2000        /* archiving program?        */
  71. #define DR_ROOM        0x4000        /* link the program to a room    */
  72. #define DR_HOME        0x8000        /* execute in home dir        */
  73.     char *dr_link;
  74.     char *dr_cmd;            /* program...            */
  75.     char *dr_tail;            /* tail to pass in        */
  76.     char *dr_remark;            /* `what I do' comment...    */
  77.     struct doorway *dr_next;
  78. } ;
  79.  
  80. #define    DR_BADROOM    ((struct doorway*)(-3))    /* can't do this here        */
  81. #define    DR_ACCESS    ((struct doorway*)(-1))    /* no execute permissions    */
  82.  
  83. #endif /* _DOOR_H */
  84.